package com.sha.mumbailocal.server.model;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;
import com.sha.mumbailocal.server.model.intf.IPersistentObject;

@PersistenceCapable
public class Station implements IPersistentObject {

	@PrimaryKey
	@Persistent
	private String code;

	@Persistent
	private String name;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Key getKey(){
		return KeyFactory.createKey(Station.class.getName(),getCode());
	}
	
}